from typing import Optional, List

from pydantic import BaseModel


class SysDictInfo(BaseModel):
    sys_dict_id: Optional[int] = 0
    sys_dict_name: Optional[str] = None


class SysDictDetailInfo(BaseModel):
    sys_dict_id: Optional[int] = 0
    sys_dict_item_id: Optional[int] = 0
    sys_dict_item_name: Optional[str] = None


class UserInfo(BaseModel):
    user_id: str
    port_id: Optional[int] = 0
    user_name: Optional[str] = None
    password: Optional[str] = None
    status: Optional[int] = 0


class UserModPwdInfo(BaseModel):
    orig_password: str
    new_password: str
    repeated_password: str


class MenuInfo(BaseModel):
    menu_id: int
    function_path: str
    flag: int


class PortMenusInfo(BaseModel):
    port_id: int
    menus: List[MenuInfo]
